﻿using System.Collections.Generic;
using System.Linq;

namespace Yuchen.NPA.Core.CompilerService.RegularExpression
{
    internal abstract class Node
    {
        internal Node(Node[] children)
        {
            Children = children.ToList();
        }

        public abstract NodeType Type { get; }
        public IList<Node> Children { get; set; }

        public void Accept(ExpressionVisitor visitor)
        {
            visitor.Visit(this);
        }
    }
}
